package helloWorld.musicplayer;

import java.util.Vector;

public class Mp3Scraper extends Scraper {

	public Mp3Scraper() {}

	public Vector<String> getMp3List(String artist, String album) {
		capturedList = new Vector<String>();

		//spaties verwijderen & lowercase maken
		artist = artist.replaceAll(" ", "");
		artist = artist.toLowerCase();
		album = album.replaceAll(" ", "");
		album = album.toLowerCase();
		
		String url = "http://musicmp3.ru/artist_" + artist + "__album_" + album + ".html";
		String start = "Play(this,'";
		char end = ')';
		String offset = "<th>Track</th>";
		int max = 100;

		initialize(url, start, end, offset, max);

		if (searchForData())
			return capturedList;

		return null;
	}
}
